<?php
namespace app\before\validate;

use think\Validate;

class AdminBill extends Validate
{
    protected $rule = [
        'foreign_key' => 'require|number',
        'type' => 'require',
        'price' => 'require|number',
        'add_time' => 'require|number',
    ];
    protected $message = [
        'foreign_key.require' => '操作id为必填项',
        'foreign_key.number' => '操作id需为数字',
        'type.require' => '返利类型 1：需求 2：广告位为必填项',
        'price.require' => '返利金额为必填项',
        'price.number' => '返利金额需为数字',
        'add_time.require' => '返利时间为必填项',
        'add_time.number' => '返利时间需为数字',
    ];
    protected $scene = [
        'edit' => [
            'foreign_key',
            'type',
            'price',
            'add_time',
        ],
    ];
}
